<?php
require_once '../functions/config.php';
$dbc=mysqli_connect(BD_SERVER,BD_USER,BD_PASS,BD_NAME) or die('No se pudo establercer la conexion');

mysqli_query($dbc, "TRUNCATE mio_mercado");
/*$items=mysqli_query($dbc,"SELECT * FROM mio_mercado");
if (mysqli_num_rows($items)>0){
    while ($item=mysqli_fetch_array($items)){
        $consulta="DELETE FROM mio_mercado WHERE `precio`=".$item['precio']." AND `volumen`=".$item['volumen']." AND `typeID`=".$item['typeID']." AND `bid`='".$item['bid']."' AND `issued`='".$item['issued']."' AND `duration`=".$item['duration']." AND `stationID`=".$item['stationID']." AND `region`=".$item['regionID']." AND `solarSystemID`=".$item['solarSystemID'];
                mysqli_query($dbc, $consulta);
    }
}*/
$items=mysqli_query($dbc,"SELECT * FROM mio_datosmercader");
if (@mysqli_num_rows($items)>0){
    while ($item=mysqli_fetch_array($items)){
        $consulta="DELETE FROM mio_datosmercader WHERE `cargo`=".$item['cargo']." AND `dinero`=".$item['dinero'];
        mysqli_query($dbc, $consulta);
    }
}
header("location: trade_amarr_jita.php");
?>
